package com.feynman.pattern.factory.simplefactory;

import com.feynman.pattern.factory.Phone;

/**
 * @ClassName SimpleFactoryTest
 * @Description 简单工厂测试
 * @Author Feynman
 * @date 2019/4/4 11:06
 * @Version V1.0
 **/
public class SimpleFactoryTest {
    public static void main(String[] args) {
        /*PhoneFactory factory = new PhoneFactory();
        Phone phone = factory.product("com.feynman.pattern.factory.Iphone");
        phone.call();*/

        PhoneFactory factory = new PhoneFactory();
        Phone phone = factory.product(com.feynman.pattern.factory.Iphone.class);
        phone.call();

        /*Phone huawei = factory.product("huawei");
        huawei.call();

        Phone xiaomi = factory.product("xiaomi");
        xiaomi.call();*/
    }
}
